﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using AssessmentTool.Services.DTO;
using AssessmentTool.Services;
namespace AssessmentTool.ServiceBridge
{
    public class ModelloServiceBridge
    {
        public static ModelloServiceClient getProxy()
        { 
            var proxy = new ModelloServiceClient();
            proxy.Endpoint.Address = DynamicEndpointHelper.ResolveEndpointUrl("ModelloService");
            return proxy;
        }

        public static void getCompetenze(String username,EventHandler<getModelloFromUtenteCompletedEventArgs> handler)
        {
            var proxy=getProxy();
            proxy.getModelloFromUtenteCompleted += new EventHandler<getModelloFromUtenteCompletedEventArgs>(handler);
            DTOUtente dto = new DTOUtente();
            dto.Username = username;
            proxy.getModelloFromUtenteAsync(dto);
        }
        public static void getDictionary(String language, EventHandler<getDictionaryCompletedEventArgs> handler)
        {
            var proxy = getProxy();
            proxy.getDictionaryCompleted += new EventHandler<getDictionaryCompletedEventArgs>(handler);
            proxy.getDictionaryAsync(language);
        }
    }
}
